<?php

namespace app\admin\controller;

use think\Request;
use think\Db;
use think\Controller;
use think\Log;
class Index extends Controller
{
	public function index()
	{   
		return $this->fetch();
	}
	public function home()
	{   $time=time();
		$usercount=Db::name('user')->count();
		$waitersend=Db::name('inorder')->where('ddzt','已支付待发货')->count();
		$receive=Db::name('inorder')->where('ddzt','已签收')->count();
		$goodscount=Db::name('goods')->count();
		$order=Db::name('orders')->count();
		$up=Db::name('goods')->where('isfall','1')->count();
		$down=Db::name('goods')->where('isfall','0')->count();
		$this->assign('time',$time);
		$this->assign('usercount',$usercount);
		$this->assign('waitersend',$waitersend);
		$this->assign('receive',$receive);
		$this->assign('order',$order);
		$this->assign('up',$up);
		$this->assign('down',$down);
		$this->assign('goodscount',$goodscount);
		return $this->fetch();
	}

}